<template>
	<view>
		<image style="width: 100%;height: 500px;" src="../../static/part-00354-1289.jpg" mode="">
		</image>
		<view class="detail">
			￥17.9
		</view>
		<view class="line">
		</view>
		<view style="display: flex;">
			<view style="width: 50%;text-align: center;border-bottom: 2px solid red;">产品详情</view>
			<view style="width: 50%;text-align: center;">产品参数</view>
		</view>
		<view style="display: flex; position: fixed;bottom: 0;width: 100%;background-color: #FF6139;" >
			<view class="grid-item-box" style="background-color: #FF6139; flex: 1;display: flex;flex-direction: column;align-items: center;color: #ffff;" v-for="item in footlist" :key="item">
				<image :src="item.img" mode="" style="width: 30px;height: 30px;padding: 10px;"></image>
				<text class="text">{{item.name}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	import request from '../../request.js'
	export default {
		data() {
			return {
				goodsDetail: {
					goods: {
						price: ''
					}
				},
				options: [{
					icon: 'shop',
					text: '回首页',
					infoBackgroundColor: '#007aff',
					infoColor: "red"
				}, {
					icon: 'cart',
					text: '购物车',
					info: 2
				}],
				buttonGroup: [{
						text: '加入购物车',
						backgroundColor: '#ff0000',
						color: '#fff'
					},
					{
						text: '立即购买',
						backgroundColor: '#ffa200',
						color: '#fff'
					}
				],
				footlist: [{
						img: '../../static/DH.png',
						name: '电话咨询',
					},
					{
						img: '../../static/QQ.png',
						name: 'QQ客服',
					},
					{
						img: '../../static/ZX.png',
						name: '在线留言',
					},
					{
						img: '../../static/DT.png',
						name: '在线地图',
					},
					{
						img: '../../static/xx.png',
						name: '信息咨询',
					},
				]
			};
		},
		onLoad(options) {
			// this.getdetail(options.id)
		},
		methods: {
			onClick(e) {
				uni.showToast({
					title: `点击${e.content.text}`,
					icon: 'none'
				})
			},
			buttonClick(e) {
				if (e.index == 1) {
					uni.navigateTo({
						url: '../submit-order/submit-order'
					})
				}
				this.options[1].info++
			},
			// 商品详情
			getdetail(id) {
				uni.showLoading({
					title: '加载中'
				})
				request({
					data: {
						controller: 'goods.get_goods_detail',
						id,
					},
					success: (res) => {
						this.goodsDetail = res.data.data
						uni.hideLoading()
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.line {
		margin-top: 20rpx;
		height: 1px;
		background-color: #ccc;
		width: 100%;
		// margin-left: -20rpx;
		margin-bottom: 20rpx;
	}

	.detail {
		position: relative;
		color: red;
		font-size: 20px;
	}
</style>